<?php

namespace App\Http\Middleware;
use Closure;
use Illuminate\Auth\Middleware\Authenticate as Middleware;



class IndexAuth extends Middleware
{
    public function handle($request, Closure $next, ...$guards)
    {
//        var_dump(session('admin'));exit();
//        if(!session('aaa')){//判断用户未登录就跳转至登录页面
//
//            return redirect('/admin/login');
//        }
       var_dump(session('aaa')) ;
//        echo '1234';

        $response = $next($request);

        //如果已登录则执行正常的请求
        return $response;
    }
}
